<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">核查任务通知书</h2>
    </div>
    <!-- 标题 -->
    <div>
     <form action="#" method="post" class="form-inline formpage" id="form_check">
               <input type="hidden" value='{$page}' name="page" id="page-go"/>
                      <input type="hidden" value='{$list}' name="list" id="list-go"/>
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td class="text-left" colspan="8" rowspan=""><a href="{:url('xiafa')}" class="btn btn-primary">新增核查任务通知书</a></td>
          </tr>
      </table>
    
      <table class="table table-striped row-margin-top table-bordered text-center bud_hei">
          <tr class="info text-center">
            <th class="text-center">NO.</th>
            <th class="text-center">编号</th>
            <th class="text-center">填表人</th>
            <th class="text-center">检查人</th>
            <th class="text-center">原申请文件编号</th>
            <th class="text-center">通知日期</th>
            <th class="text-center">检核状态</th>
            <th class="text-center">操作</th>
          </tr>
          {volist name="apply" id="vo"}
            <tr class="text-center">
              <td>{$i}</td>
              <td><a onclick="hxiangqing({$vo.id})">{$vo.no}</a></td>
              <td>{$vo.tianbiaoren}</td>
              <td>{$vo.heren}</td>
              <td>
                {volist name="$vo.ti" id="ti" key="j"}
                  {if $ti.type_id==2}
                    <a onclick="xiangqing({$ti.id})">{$ti.sn}</a><br/>
                  {elseif $ti.type_id==0/}
                    <a onclick="fxiangqing({$ti.id})">{$ti.sn}</a><br/>
                  {else/}
                     <a onclick="jxiangqing({$ti.id})">{$ti.sn}</a><br/>
                  {/if}
                {/volist}
              </td>
              <td>{$vo.ctime}</td>
              <td>
                {if $vo.state==0}
                  暂存
                {elseif $vo.state==1/}
                下发
                {/if}
              </td>
              <td>{if $vo.state==0}<a onclick="tj({$vo.id})">提交</a> <a href='{:url("xiafa")}?hid={$vo.id}'>修改</a> <a onclick="sc({$vo.id})">删除</a>{/if}</td>
            </tr>
          {/volist}
      </table>
      <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script>每页显示
           <select id="pagesize">
                        <option value='10' {if condition="$list eq 10"}selected{/if}>10条</option>
                        <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>
                        <option value='40'{if condition="$list eq 40"}selected{/if}>40条</option>

            </select>
        </h5>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
     <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
       <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script>
    //详情也
function hxiangqing(aid){
     location.href='{:url("detail")}?hid='+aid
                        
}
                           //翻页
     
     function sc(id){
      $.post("{:url('shanchu')}",{id:id},function(re){
        //alert(re);
        if(re==1){
          swal({
                              title: "完成",
                              text: "操作已成功",
                              type: "success"
                              },function(){

                                location.href="{:url('lists')}";
                              })
        }else{
              swal({
                              title: "错误",
                              text: "系统繁忙请稍后再试",
                              type: "warning"
                              });
        }
      })
    }
    function tj(id){
      $.post("{:url('tijiao')}",{id:id},function(re){
        if(re==1){
          swal({
                              title: "完成",
                              text: "操作已成功",
                              type: "success"
                              },function(){

                                location.href="{:url('lists')}";
                              })
        }else{
              swal({
                              title: "错误",
                              text: "系统繁忙请稍后再试",
                              type: "warning"
                              });
        }
      })
    }
 //详情也
function xiangqing(aid){
     var index = layer.open({
                            type:2,
                            title:'常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Ti_apply/apply_de")}?aid='+aid
                        })
}
  //详情也
function fxiangqing(aid){
     var index = layer.open({
                            type:2,
                            title:'非常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Ti_apply2/view")}?id='+aid
                        })
}
 //详情也
function jxiangqing(aid){
     var index = layer.open({
                            type:2,
                            title:'进场费用申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Tijinchang/view")}?id='+aid
                        })
}
    </script>
</body>

</html>
